DUA3:<000000>PASCAL036.RELEASE_NOTES;15

















                    VAX PASCAL V3.6 Release Notes

                    VAX PASCAL V3.6 Release Notes

                           8 September 1987

                           8 September 1987







     This document contains information about new features in VAX
     PASCAL V3.6, differences between V3.6 and previous versions,
     corrections included in VAX PASCAL V3.6, and  other  topics.
     This  file  is  of  interest  to  both system management and
     application programmers.








                                   CONTENTS



CHAPTER 1       VAX PASCAL V3.6 RELEASE NOTES

        1.1     NEW FEATURES IN VAX PASCAL V3.6  . . . . . . . . . 1-1
        1.1.1     KEY Attribute Enhancements . . . . . . . . . . . 1-1
        1.2     COMPATIBILITY NOTES  . . . . . . . . . . . . . . . 1-2
        1.2.1     Default Length And Digits Parameters For DEC And 
                  UDEC . . . . . . . . . . . . . . . . . . . . . . 1-2
        1.3     STARLET.PAS INSTALLATION DEPENDENCY  . . . . . . . 1-3
        1.4     KNOWN RESTRICTIONS . . . . . . . . . . . . . . . . 1-4
        1.4.1     Blank Padding Of PACKED ARRAY OF CHAR Value 
                  Parameters . . . . . . . . . . . . . . . . . . . 1-4
        1.4.2     String Expressions As Actual Value Parameters  . 1-4
        1.4.3     Passing File Buffer Variables  . . . . . . . . . 1-5


CHAPTER 2       VAX PASCAL V3.6 MAINTENANCE FIXES
















































                              CHAPTER 1

                              CHAPTER 1

                    VAX PASCAL V3.6 RELEASE NOTES

                    VAX PASCAL V3.6 RELEASE NOTES



1.1  NEW FEATURES IN VAX PASCAL V3.6

There are no new features in VAX PASCAL V3.6, but one new feature that
was  added  in  V3.5  is  affected  by  VAX/VMS V4.6.  Therefore, this
section from the Version 3.5 release notes is being repeated.



1.1.1  KEY Attribute Enhancements

The KEY attribute has been extended to allow additional properties  to
be  specified  for ISAM keys.  The KEY attribute now has the following
forms:

    KEY [ (key_number) ]
    KEY [ (key_number [,options...]) ]
    KEY [ (options,...) ]

The parameter keynumber represents the ISAM key number.  A key  number
of  0  indicates  the  primary  key  and  all  other  numbers indicate
alternate keys.  If you omit the key number, the default value is 0.

The following options have been added:

      o  ASCENDING - Specifies an ascending collating sequence.

      o  DESCENDING - Specifies a descending collating sequence.

      o  [NO]CHANGES - Specifies that changes can be performed on  the
         key.

      o  [NO]DUPLICATES - Specifies that duplicates  of  the  key  are
         allowed.

By default, the primary key is ASCENDING, NOCHANGES, and  NODUPLICATES
and  alternate  keys  are  ASCENDING,  CHANGES, and DUPLICATES.  It is
illegal to specify CHANGES on the primary key.


                                 1-1





















                    VAX PASCAL V3.6 RELEASE NOTES

                    VAX PASCAL V3.6 RELEASE NOTES


These defaults are  the  same  as  previously  used  in  the  Run-Time
Library,  so  programs  compiled with an earlier version of VAX PASCAL
will continue to function as they have previously.

The CHANGES and DUPLICATES options are used only  when  creating  ISAM
files.   They  are  ignored for opening existing files.  The ASCENDING
and DESCENDING keywords are used to define the keys for file  creation
and are used to verify keys when opening an existing file.  If neither
ASCENDING or DESCENDING is specified when opening an existing file, no
check will be performed and either type will be accepted.

     This  new  feature  requires  PASRTL  (VAX  PASCAL  Run-Time

     This  new  feature  requires  PASRTL  (VAX  PASCAL  Run-Time
     Library)  support that won't be available until VAX/VMS V4.6

     Library)  support that won't be available until VAX/VMS V4.6
     or greater.  If  you  use  any  of  the  new  KEY  attribute

     or greater.  If  you  use  any  of  the  new  KEY  attribute
     options,  the  object  file produced will not run on systems

     options,  the  object  file produced will not run on systems
     earlier than VAX/VMS V4.6.  The  VAX  PASCAL  V3.5  compiler

     earlier than VAX/VMS V4.6.  The  VAX  PASCAL  V3.5  compiler
     will print an informational message warning you of this fact

     will print an informational message warning you of this fact
     when you use any of the  KEY  options.   This  informational

     when you use any of the  KEY  options.   This  informational
     message will be removed in a future release of VAX PASCAL.

     message will be removed in a future release of VAX PASCAL.



1.2  COMPATIBILITY NOTES

There have been no new incompatibilities added  to  VAX  PASCAL  V3.6.
However,  there  was one incompatibility added to VAX PASCAL V3.5 that
is affected by VAX/VMS V4.6.  Therefore, this section from the Version
3.5 release notes is being repeated.



1.2.1  Default Length And Digits Parameters For DEC And UDEC

The DEC and UDEC builtin routines  incorrectly  computed  the  default
length  and default digits parameter.  The default length parameter is
determined by the compiler at  compile-time  and  the  default  digits
parameter is determined at run-time by the Run-Time Library.

The  VAX  PASCAL  V3.5  compiler  has  been  modified  to  change  the
computation  of  the  default length.  Unless you recompile the source
files, this change won't be seen by existing applications.

The default length of the DEC  and  UDEC  builtin  routines  has  been
changed  from  12  characters  to  11 characters.  This will result in
shorter strings being returned from DEC and  UDEC.   This  change  was
done  so  the  default  output of DEC and UDEC was compatible with the
default output of the WRITE statement.  The output will now  be  a  10
character number preceded by a single blank or a single minus sign.

The VAX/VMS V4.6 PASRTL (VAX PASCAL Run-Time Library) will be modified
to  change the computation of the default digits.  Since the PASRTL is
activated  at  image-activation  time,  this  change  will   be   seen


                                 1-2





















                    VAX PASCAL V3.6 RELEASE NOTES

                    VAX PASCAL V3.6 RELEASE NOTES


immediately  by  all programs that default the digits parameter of DEC
and UDEC.

The default digits of the DEC  and  UDEC  builtin  routines  has  been
changed from 8 digits to 10 digits.

Given the following program:

   PROGRAM V35(OUTPUT);
     BEGIN
     WRITELN('<',DEC(1),'>');
     WRITELN('<',DEC(-1),'>');
     END.

The VAX PASCAL V3.4 compiler  under  VAX/VMS  V4.5  will  produce  the
following output:

<    00000001>
<   -00000001>

The VAX PASCAL V3.5  compiler  under  VAX/VMS  V4.6  or  greater  will
produce the following output:

< 0000000001>
<-0000000001>


To retain the current behavior, you must modify your calls to DEC  and
UDEC  and  explicitly  specify a default length of 12 characters and a
default digit count of 8 digits.

The VAX/VMS V4.6 PASRTL also corrects another  problem  with  DEC  and
UDEC.   The  routines  will  now  truncate  long strings as documented
instead of filling them with asterisks.



1.3  STARLET.PAS INSTALLATION DEPENDENCY

The VAX PASCAL V3.6 kit does not contain a new STARLET.PAS  kit.   The
existing  kit,  PASSTR034,  is  only  provided  to new customers or on
magnetic tape media.  While the STARLET.PAS kit was  not  updated,  we
strongly  suggest that you reinstall PASSTR after each VAX/VMS upgrade
or update.  This is because the STARLET.PAS file that is built by  the
PASSTR034  facility is built from a file of definitions shipped on the
VAX/VMS kit.  This file is SYS$LIBRARY:STARLETSD.TLB.   This  file  is
owned  and  maintained  by  the  VAX/VMS  group  and may be updated by
VAX/VMS releases.  After each VAX/VMS update or upgrade,  reinstalling
STARLET.PAS  allows you to get any corrections or enhancements made to
SYS$LIBRARY:STARLETSD.TLB.




                                 1-3





















                    VAX PASCAL V3.6 RELEASE NOTES

                    VAX PASCAL V3.6 RELEASE NOTES


1.4  KNOWN RESTRICTIONS

This section includes all known restrictions in the  VAX  PASCAL  V3.6
compiler.



1.4.1  Blank Padding Of PACKED ARRAY OF CHAR Value Parameters

A  string  parameter  must  be  structurally   compatible   with   its
corresponding  formal  parameter.   The  VAX  PASCAL compiler will not
blank pad a fixed length character string expression  with  blanks  to
match  the  formal  declaration.   Also  VAX PASCAL will not blank pad
default values for such string parameters.  For example, the following
program segment will produce a compile-time error:

   TYPE STR40 = PACKED ARRAY [1..40] OF CHAR;

   PROCEDURE PASS_STR40( P : STR40 );
      BEGIN
      END;

   BEGIN
   PASS_STR40('Shorter than 40 chars');
   END.




1.4.2  String Expressions As Actual Value Parameters

If several formal value parameters are declared in  the  same  section
and  have  the  same conformant packed array schema, all corresponding
actual parameters must have the same bounds at run-time.  For example:

   PROCEDURE P( A,B : PACKED ARRAY [L..U:INTEGER] OF CHAR );

In a call to P, the actual parameters passed to  A  and  B  must  have
identical  string  bounds.  However, due to an error in the VAX PASCAL
compiler, the bounds of  these  parameters  are  not  checked.   If  a
program  calls  P  with  two  character-string parameters of different
lengths, an error will not be signaled and the bound identifiers L and
U will not correctly describe the bounds of the formal parameter B.

This restriction applies only to string expressions  passed  to  value
conformant  PACKED  ARRAY  OF CHAR parameters.  For all other types of
parameters, bounds checking is done during compile-time.







                                 1-4





















                    VAX PASCAL V3.6 RELEASE NOTES

                    VAX PASCAL V3.6 RELEASE NOTES


1.4.3  Passing File Buffer Variables

When the buffer variable of a file is passed as a VAR  parameter,  the
allocation  size  of  the  formal VAR parameter must match that of the
components of the file.  Failure to do so will result in  an  Internal
Compiler Error.  For example:

   PROGRAM A;
   VAR
      F : PACKED FILE OF 0..65535;
      G : FILE OF [WORD] 0..65535;

   PROCEDURE P( VAR I : INTEGER ); EXTERNAL;

   BEGIN
   P(F^); { causes an Internal Compiler Error }
   P(G^); { causes an Internal Compiler Error }
   END.




































                                 1-5
































                              CHAPTER 2

                              CHAPTER 2

                  VAX PASCAL V3.6 MAINTENANCE FIXES

                  VAX PASCAL V3.6 MAINTENANCE FIXES




This chapter describes  all  the  changes  for  the  VAX  PASCAL  V3.6
release.



      o  (SPR 11-94828)  The compiler occasionally generated incorrect
         code  when  creating  the  length  field  for  UNSAFE,CLASS_S
         descriptors when the parameter was a string expression.  This
         problem has been fixed.


      o  (SPR 11-94368)  The  compiler   occasionally   generated   an
         Internal   Compiler   Error   during   Profit  Analysis  with
         optimizations enabled when an  IF_THEN_ELSE  always  performs
         the ELSE clause as in the following example:

            BOOL := FALSE;
            IF BOOL 
            THEN
               { never executed }
            ELSE
               { always executed }

         This problem has been fixed.


      o  (SPR 11-96066)  The compiler incorrectly  allocated  multiple
         stack  variables  in the same memory location when a multiple
         longword  variable  was  more  desirable  than  two   smaller
         variables  and  the  smaller  variables  were repositioned to
         other stack locations by the stack/register allocator.   This
         problem has been fixed.






                                 2-1





















                  VAX PASCAL V3.6 MAINTENANCE FIXES

                  VAX PASCAL V3.6 MAINTENANCE FIXES


      o  (SPR 11-95581)  The compiler did not properly handle ''  (the
         null  string)  as the default for a formal value parameter of
         type [UNSAFE] CHAR.  If  the  procedure  was  being  expanded
         inline,  an  Internal Compiler Error during Tree Construction
         would occur.  If it was not expanded inline,  incorrect  code
         would be generated.  This problem has been fixed.


      o  (SPR 11-95829)  The compiler would occasionally over optimize
         invalid Boolean CASE statements such as the following :

            PROGRAM BOOLEANCASE (OUTPUT );
            VAR
              TEST_VARIABLE : BOOLEAN;
            BEGIN
            TEST_VARIABLE := TRUE;
            CASE TEST_VARIABLE OF
               FALSE : WRITELN(TEST_VARIABLE); {ALWAYS EXECUTED}
            END;
            END.

         The WRITELN will be executed no  matter  what  the  value  of
         TEST_VARIABLE.    The  compiler  assumed  that  all  possible
         Boolean values would be represented in the CASE  label  list,
         it  did  not  consider the invalid situation where one of the
         possible values was not represented.  While the  behavior  of
         this program is undefined, the compiler now produces the same
         code prior to the change introduced in V3.4-114.


      o  When compiling a program that inherited over  40  environment
         files,  the  compiler  sometimes  produced an invalid VAX SCA
         source analysis file.  This problem has been fixed.


      o  (SPR 11-96080)  The compiler did not  generate  correct  code
         when  a  WHILE  loop's boolean expression was duplicated in a
         nested IF statement as in the following example:

                  WHILE NOT EOF(FILE_NAME) DO
                    BEGIN
                        ...
                        IF NOT EOF(FILE_NAME) THEN
                           ...
                    END;

         This problem has been fixed  and  the  correct  code  is  now
         generated.






                                 2-2





















                  VAX PASCAL V3.6 MAINTENANCE FIXES

                  VAX PASCAL V3.6 MAINTENANCE FIXES


      o  The compiler did not generate  correct  code  for  relational
         expressions  when  one  operand  was  a set constructor of an
         enumerated type containing between 17 and 24 elements.   This
         problem has been fixed.


      o  (SPR 11-96098)  The  compiler   occasionally   generated   an
         Internal  Compiler  Error during Source Analysis when a CONST
         with  value  ''  (the  null   string)   was   inherited   and
         concatenated with another string in a context that required a
         compile-time expression.  This problem has been fixed.


      o  (SPR 11-95944)  The compiler occasionally generated incorrect
         code for the READV builtin when compiling with /OPTIMIZE.  If
         the READV source-string was an  automatic  variable  and  the
         last  reference  to  it was in the READV call, and one of the
         variable-identifiers was an automatic variable and its  first
         reference  was  in  the  READV parameter list, then the stack
         locations allocated for these variables may have  overlapped.
         This problem has been fixed.


      o  (SPR ICA-5872)  The compiler did not properly align automatic
         variables  which  were  structured  types  declared  with the
         ALIGNED attribute.  This problem has been fixed.


      o  The compiler  occasionally  generated  an  Internal  Compiler
         Error during Source Analysis when /ANALYSIS_DATA was selected
         and there were many  constant  declarations  in  the  source.
         This problem has been fixed.


      o  (SPR ICA-6330)  The  compiler   occasionally   generated   an
         Internal Compiler Error during Context Analysis when /NOCHECK
         was specified with optimizations enabled  when  processing  a
         routine  containing  nested  IF  statements with common array
         indices.  This problem has been fixed.


      o  (SPR ICA-5915)  The  compiler   occasionally   generated   an
         Internal Compiler Error during Profit Analysis when compiling
         nested structured statements with multiple occurrences of the
         same string comparison.  This problem has been fixed.


      o  (SPR MST-2862)  The compiler occasionally generated incorrect
         code  for  /NOOPTIMIZE  when a loop contained a label and all
         references to a variable followed that label.




                                 2-3





















                  VAX PASCAL V3.6 MAINTENANCE FIXES

                  VAX PASCAL V3.6 MAINTENANCE FIXES


      o  The compiler would produce an invalid VAX SCA source analysis
         file  when  a  formal  parameter  list was declared both in a
         FORWARD routine header and in the header for  that  routine's
         body.   This  would  cause  a VAX SCA error when the file was
         loaded into the database.  This problem has been fixed.


      o  (SPR ICA-7338)  The  compiler  would  occasionally   generate
         incorrect  code  when  a  common  subexpression  was found in
         subsequent looping constructs as in the following example:

                 REPEAT
                       A := A + 1
                 UNTIL A > 5;

                 FOR I:= 1 TO 5 DO
                      C := A + 1; 

         The common subexpression A+1 was incorrectly given the  value
         6  in  the  second  looping  construct instead of the correct
         integer value 7.  This problem has been fixed.


      o  (SPR ICA-7923)  The  compiler  would  occasionally   generate
         incorrect  results  when  global literals (variables with the
         [GLOBAL,VALUE] attributes) were defined in the same module as
         executable code.  This problem has been fixed.


      o  The compiler would generate a bad  VAX  SCA  source  analysis
         file  when  /ANALYSIS_DATA  was  specified  for  an erroneous
         source program containing a MODULE or PROGRAM statement  with
         no  identifier.   Additionally, a bad VAX SCA source analysis
         file was generated for source code which contained procedural
         parameters.  These problems have been corrected.


      o  (SPR ICA-8693)  When compiling with /CHECK, poor  code  would
         be  generated  for FOR-loops when the control variable was an
         enumerated type with more than 127 elements.  This poor code,
         a  CVTLB  instruction instead of a MOVB, would generate extra
         exceptions which were ignored by  the  run-time  library  but
         made debuging difficult.  This problem has been corrected.


      o  (SPR ICA-8279)  The  /CROSS_REFERENCE  listing  would  report
         multiple  references  for  an  identifier  immediately to the
         right of the assignment operator.  For example,

           I := J;

         would produce two references to  J  in  the  cross  reference


                                 2-4





















                  VAX PASCAL V3.6 MAINTENANCE FIXES

                  VAX PASCAL V3.6 MAINTENANCE FIXES


         listing.  This problem has been fixed.


      o  The ZERO builtin function would generate multiple  references
         in  the /CROSS_REFERENCE listing and would not produce enough
         references in the VAX SCA  source  analysis  file.   Both  of
         these problems have been fixed.


      o  The compiler occasionally would generate an Internal Compiler
         Error   during  Final.   This  was  caused  by  the  compiler
         overwriting some internal  data  structures  when  trying  to
         generate  debug  information for formal procedure parameters.
         This problem has been fixed.


      o  (SPR ICA-8697)  When  compiling  with  /USAGE,  the  compiler
         would occasionally generate an Internal Compiler Error during
         Source Analysis when a call to the builtin routine  SIZE  was
         included  in  the declaration section.  This problem has been
         corrected.


      o  (SPR ICA-6958)  The compiler would occasionally  generate  an
         Internal  Compiler  Error  when  a  module contained over 170
         nested IF statements.  This problem has been corrected.


      o  Formal  parameters  declarations  that  used   one   of   the
         descriptor  attributes  (CLASS_A, CLASS_NCA, or CLASS_S) were
         not described correctly in the VAX SCA source analysis  file.
         This problem has been corrected.


      o  The compiler would  generate  an  incorrect  VAX  SCA  source
         analysis  file  when a program used the %INCLUDE directive to
         include a module from a text library.  This problem has  been
         fixed.


      o  (SPR ICA-8620)  The  compiler  would  occasionally   generate
         incorrect  code  when optimizations were enabled for a module
         containing an IF statement nested within a looping  construct
         with  an end of file test identical to the looping constructs
         boolean expression.  This problem has been corrected and  the
         correct code is now generated.








                                 2-5





